package com.lanou.pianke.admin.service.impl;


import com.lanou.pianke.admin.mapper.PieceTagMapper;
import com.lanou.pianke.admin.service.PieceTagService;
import com.lanou.pianke.piecetag.web.entity.PieceTag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PieceTagServiceImpl implements PieceTagService {

    @Autowired
    private PieceTagMapper pieceTagMapper;

    @Override
    public List<PieceTag> showAll() {
        return pieceTagMapper.selectAll();
    }

    @Override
    public void deletByTagid(Long tagid) {
        pieceTagMapper.updateStatusByTagid(tagid);
    }

    @Override
    public void addTag(PieceTag pieceTag) {
        pieceTagMapper.insertTag(pieceTag);
    }


}
